stage.set_background("moon")
sprite = codesters.Sprite("astronaut1")
sprite.go_to(-125, -150)
glorp = codesters.Sprite("alien1")
glorp.go_to(100, -125)
rock = codesters.Sprite("asteroid")
rock.go_to(100, 75)
sprite.say("What do planets read?")
t = codesters.Teacher()
say_color = t.find_function('set_say_color')
try:
tval1 = say_color[0][1]
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success("white" in tval1, "Great job!")
t1.add_failure(tval1 == "DNE", "Did you add a Set Say Color command to your program?")
t1.add_failure('"blue"' in tval1, "Did you change the color in the Set Say Color command to white?")
t1.add_creative(tval1 != "DNE" and '"blue"' not in tval1 and '"white"' not in tval1, "That's a good color for your text also!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)